package com.luyuan.crm.question.web;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.luyuan.crm.question.model.Question;
import com.luyuan.crm.question.service.QuestionService;
import com.ruijie.web.jsf.action.BaseAction;

@Component("addQuestionAction")
@Scope("view")
public class AddQuestionAction extends BaseAction {

	private Question question = new Question();

	@Resource(name = "questionService")
	private QuestionService questionService;

	public void addQuestion() {
		questionService.save(question);
	}


	public Question getQuestion() {
		return question;
	}

	public void setQuestion(Question question) {
		this.question = question;
	}
}
